package com.rouyi.heima.news.api.client;

import com.rouyi.heima.news.api.domain.News;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient(value = "ruoyi-heima-news",path = "/news")
public interface NewsClient {

    @PostMapping
    public AjaxResult addNewsFromNotice(@RequestBody News news);

    @PutMapping
    public AjaxResult updateNewsByNoticeId(@RequestBody News news);

    @DeleteMapping("/{noticeId}")
    public AjaxResult deleteNewsByNoticeIds(@PathVariable("noticeId") Long[] ids);

    @GetMapping("/del")
    public void deledeNews();
}
